<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    let arr = [1,1,2,2,3,3,2,3,4,5,3,22]

    let arr1 = []
    for(let i = 0 ; i<arr.length ; i++){
        if(arr1.indexOf(arr[i]) === -1){
            arr1.push(arr[i])
        }
    }
    console.log('arr1',arr1)
//-------------------------------------------------------
    let arr2 = [...new Set(arr)]
    console.log('arr2',arr2)
//-------------------------------------------------------
    let arr3 = []
    arr.forEach((item) => {
        if(!arr3.includes(item)){
            arr3.push(item)
        }
    })
    console.log('arr3',arr3)
//-------------------------------------------------------
    let arr4 = [...arr]
    for(let i = 0 ; i<arr4.length ; i++){
        for(let j = i+1 ; j<arr4.length ;j++){
            if(arr4[i] === arr4[j]){
                arr4.splice(j,1)
            }
        }
    }
    console.log('arr4',arr4)
//-------------------------------------------------------
    let arr5 = [];
    let obj = {}
    for(let i = 0 ; i<arr.length ; i++){
        if(obj[typeof arr[i] + arr[i]] == undefined){
            arr5.push(arr[i])
            obj[typeof arr[i] + arr[i]] = true
        }
    }
    console.log('arr5',arr5)
    

    </script>
</body>
</html>